$panel-bg-color: white;
$side-panel-bg: white;
$base-text-color: black;

$brand-primary: #8181f3;
$base-color-1: black;
$navbar-inverse-color: black;
$navbar-inverse-bg: white;
$navbar-inverse-link-color: black;
$navbar-inverse-link-hover-color: $gray-dark;
$jumbotron-bg: white;

$form-heading-bg: black;
$border-radius-large: 0px;
$border-radius-base: 0px;
$input-border-radius: 0px;
// y'all're seriously obsesed with round edges.
* {
    border-radius: 0px !important;
}
.state-icon {
    border-radius: 8px !important;
}

// Tables
$table-heading-bg: black;
$table-border-color: black;
th a {
    color: white;
    &:hover {
        color: black;
        background: white;
    }
}

.jumbotron {
    box-shadow: 0 0 11px black;
}

.dropdown-menu {
    border: 1px solid black;
}

li.dropdown:hover a.dropdown-toggle:focus {
    color: white;
}

#masthead .navbar-brand a {
    color: black !important;
}

$navbar-hover-thingy-link-color: darken(white, 10%);
$navbar-hover-thingy-background: lighten(black, 10%);

#masthead {
    .nav > li > a {
        &:hover {
            color: $navbar-hover-thingy-link-color !important;
        }
    }
    .navbar-tabs {
        .toggle {
            color: $navbar-hover-thingy-link-color !important;
        }
        .dropdown-note {
            color: $navbar-hover-thingy-link-color !important;
        }
    }
    li.dropdown:hover {
        background: $navbar-hover-thingy-background;
    }
    li.dropdown > a:hover .caret {
        border-top-color: $navbar-hover-thingy-link-color !important;
        border-bottom-color: $navbar-hover-thingy-link-color !important;
    }
    li.dropdown.active > a:hover {
        color: $navbar-hover-thingy-link-color !important;
        background: $navbar-hover-thingy-background !important;
    }
}

// Tool links

a.tool-link {
    //display: block;
    //padding: 0.5em;

    &:hover {
        background: $gray-lighter;
    }
}

$navbar-default-bg: white;

#masthead {
    border-bottom: 1px solid black;
}

.search-clear.fa.fa-times-circle {
    color: #d82c2c;
}

div.toolMenuContainer {
    padding-left: 0px !important;
    padding-right: 0px !important;

    #tool-search {
        padding-left: 1em;
        background: white;
        //border-bottom: 1px solid $gray-light
        top: 65px; // seems to be the real / correct value.
        padding-bottom: 5px;
    }

    #tool-search-query {
        border: 1px solid transparent;
        background: #eee;

        &:focus,
        &:active {
            background: white;
            border: 1px solid black;
            box-shadow: none;
        }
    }
}

#tool-search {
    padding-left: 1em;
    background: white;
    //border-bottom: 1px solid $gray-light
    top: 65px; // seems to be the real / correct value.
    padding-bottom: 5px;
}

div.search div.search-input input {
    border: 1px solid transparent;
    background: #eee;

    &:focus,
    &:active {
        background: white;
        border: 1px solid black;
        box-shadow: none;
    }
}

// Easy to click tool section titles
div.toolSectionWrapper {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
    padding-left: 0px;
    border-left: 1px solid black;
    margin-left: 0.2em;

    div.toolSectionTitle {
        padding-left: 0.2em;
        border-left: 2px solid black;
    }
}

div.toolTitleNoSection {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
    padding-left: 0.5em;
    font-weight: normal;
}

div.toolSectionTitle,
div.toolSectionWrapper {
    a {
        padding-top: 0.4em;
        padding-bottom: 0.4em;
        display: block;
        text-decoration: none;
    }
}

div.toolPanelLabel {
    margin-left: 0.7em !important;
}
div.toolSectionBody div.toolPanelLabel {
    margin-left: 1em !important;
}

div.toolTitle,
div.toolTitleNoSection {
    margin-left: 0em !important;
    padding-left: 1em !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;

    a {
        font-weight: normal;
        padding-top: 0.4em;
        padding-bottom: 0.4em;
        display: block;
    }

    &:hover {
        background: $gray-lighter;
    }
}

input[type="submit"] {
    background: $brand-primary !important;
    border: 1px solid black !important;
    color: contrast($brand-primary) !important;
}

// Adjust older tool forms
.toolFormTitle,
.form .form-title {
    color: white;
    a {
        color: white !important;
        border: 1px solid white !important;
    }
}
// portlets
.portlet-header {
    .portlet-operations > div {
        color: white !important;
        background: transparent;
    }
    .portlet-title {
        color: white !important;
    }
}
.ui-portlet-repeat {
    border-left-width: 1px !important;
}
.form-row .help,
.toolParamHelp {
    color: $gray-dark !important;
}

// History
$state-default-text: $gray-dark;
$state-default-bg: $gray-lighter;
$state-default-border: $border-default-color;

$state-paused-border: $gray-lighter;
$state-paused-bg: white;

$state-running-border: black;
$state-running-bg: $gray-light;

$state-danger-border: black;
$state-danger-bg: lighten(red, 5%);

$state-success-border: black;
$state-success-bg: lighten(green, 15%);

.current-history-panel {
    .annotation-display {
        .annotation {
            border: 1px solid $gray-light !important;
            background: white !important;

            textarea {
                border: none;
            }
            textarea:focus {
                background: white;
            }
        }
    }
}

a.icon-btn,
div.icon-btn,
div.icon-btn > a {
    background: transparent;
    color: black;
    border: 0px;
}
a.icon-btn:hover {
    background: $gray-light;
}

ul.list-items {
    border: 0px;

    .dataset {
        border: 0px;

        div.summary {
            .help-text {
                color: black;
            }
            .job-error-text {
                background: $gray-darker;
                color: white;
                border: 0px;
            }
        }

        .dataset-peek {
            background: $gray-darker !important;
            color: white !important;
        }

        .primary-actions,
        .left,
        .right {
            a.icon-btn,
            div.icon-btn,
            div.icon-btn > a {
                background: transparent;
                color: white;
                border: 0px;
            }
            a.icon-btn:hover {
                background: $gray-dark;
            }
        }
    }

    .warnings {
        div {
            border: 1px solid black;
            background-color: white;
        }
    }

    .dataset.state-running {
        .title-bar {
            color: white;
        }
    }
    .dataset.state-paused,
    .dataset.state-new,
    .dataset.state-queued {
        .title-bar {
            color: black;
        }
        .primary-actions,
        .left,
        .right {
            a.icon-btn,
            div.icon-btn,
            div.icon-btn > a {
                color: black;
            }
        }
    }
}

.current-history-panel .list-item.history-content.current-content {
    border-left: 5px solid $gray-darker !important;
}

// Modals
//
div.modal {
    div.modal-footer {
        button {
            border: 1px solid black;
            background: white;
        }
    }
}

// Select2

.select2-container {
    box-shadow: none;

    ul.select2-choices {
        border: 1px solid $gray-dark;
        box-shadow: none;

        li.select2-search-choice {
            background: white;
            color: black;
            border: 1px solid black;
        }
    }
}
// pages
.unified-panel-header {
    .panel-header-text {
        color: black !important;
    }
}

// Library
.library_style_container tr:hover td {
    background-color: $gray-lighter !important;
}

.library_style_container tr.dark td {
    background-color: $gray-light !important;
    border-bottom-color: $gray-light !important;
}

// Pagination
.pagination > .active > a {
    background-color: $brand-primary !important;
}

.pagination a {
    padding-left: 0.8em !important;
    padding-right: 0.8em !important;
}
